package com.mhs.mainform;

import com.mhs.tracuu.TraCuu;

import com.mhs.mhs_gui.R;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.TabHost;

public class A_GiaoDienActivity extends Activity {
	/** Called when the activity is first created. */
	@Override
	public void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.mainform);

		TabHost tabHost = getTabHost();
		TabHost.TabSpec spec;
		Intent intent;
	}

	private TabHost getTabHost() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	protected void onStart() {
		super.onStart();

	}

	public void onClick(View view){
		switch (view.getId()) 
		{
		case R.id.btn_exit:
			((ImageButton)findViewById(R.id.btn_exit)).setBackgroundResource(R.drawable.exit_onclick2);
			System.exit(0);
			break;
		case R.id.img_tracuu:
			Intent tracuuIntent = new Intent(this, TraCuu.class);
			startActivity(tracuuIntent);
			break;
		}
	}

	public void ShowDialog(String message, String title)
	{
		AlertDialog.Builder builder = new AlertDialog.Builder(this);
		builder.setTitle(title);
		builder.setMessage(message);
		builder.setPositiveButton("OK", new DialogInterface.OnClickListener() 
		{
			public void onClick(DialogInterface dialog, int which) 
			{
				// TODO Auto-generated method stub                            
			}                        
		});
		builder.show();
	}
}